/**
 * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springblade.modules.appeal.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springblade.core.mp.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 实体类
 *
 * @author Blade
 * @since 2022-09-02
 */
@Data
@TableName("blade_appeal")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Appeal对象", description = "Appeal对象")
public class Appeal extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ApiModelProperty(value = "id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
	@NotBlank(message = "用户名不能为空")
    private String username;
    /**
     * 联系人姓名
     */
    @ApiModelProperty(value = "联系人姓名")
    private String lxrName;
    /**
     * 性别
     */
    @ApiModelProperty(value = "性别")
    private Integer sex;
    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    private String email;
    /**
     * 是否公开
     */
    @ApiModelProperty(value = "是否公开")
    private Integer ispublic;
    /**
     * 手机号码
     */
    @ApiModelProperty(value = "手机号码")
	@NotBlank(message = "手机号不能为空")
	private String phone;

    /**
     * 诉求标题
     */
    @ApiModelProperty(value = "诉求标题")
	@NotBlank(message = "诉求标题不能为空")
	private String gdTitle;

    /**
     * 诉求内容
     */
    @ApiModelProperty(value = "诉求内容")
	@NotBlank(message = "诉求内容不能为空")
	private String wtms;
    /**
     * 诉求反应时间
     */
    @ApiModelProperty(value = "诉求反应时间")
	@NotNull(message = "诉求反应时间不能为空")
	@DateTimeFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
		pattern = "yyyy-MM-dd HH:mm:ss"
	)
	private Date fysj;
    /**
     * 事发区域
     */
    @ApiModelProperty(value = "事发区域")
    private String address;
    /**
     * 诉求类型
     */
    @ApiModelProperty(value = "诉求类型")
    private String contentType;
    /**
     * 是否保密
     */
    @ApiModelProperty(value = "是否保密")
    private Integer isbm;
    /**
     * 文件
     */
    @ApiModelProperty(value = "文件")
    private String file;

	@ApiModelProperty(value = "统一社会编码")
	private String unitCode;

	@ApiModelProperty(value = "用户类型")
	private String userType;

	private Integer replyStatus;

	@TableField(exist = false)
	private List<Map<String,Object>> files;

}
